package com.uikoo9.util.jfinal;

import com.jfinal.aop.Interceptor;
import com.jfinal.core.ActionInvocation;
import com.uikoo9.manage.y.util.RequestKit;

/**
 * Created with IntelliJ IDEA. 拦截器，存放、获取、删除 request
 * User: user
 * Date: 15-9-3
 * Time: 下午7:06
 * To change this template use File | Settings | File Templates.
 */
public class QRequestInter implements Interceptor {

    public void intercept(ActionInvocation inv) {
        RequestKit.put(inv.getController().getRequest());
        try {
            inv.invoke();
        }
        finally {
            RequestKit.remove();
        }
    }
}